<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>作业</title>
	</head>
	
	
	<body>
		<div id="app">
			<h1>数值合：{{count}}</h1>
			数a<input type="text"  v-model="num1"  />
			数b<input type="text"  v-model="num2" v-on:keyup.enter="addNum()"  />
			<button @click="addNum()">计算</button>
		</div>
		<script src="../js/vue.js"></script>
		<script >
			const APP=new Vue({
				el: "#app",
				data: {
					num1: 0,
					num2: 0,
					count: 0,
				},
				methods:{
					addNum(){
						this.count=parseInt(this.num1)+parseInt(this.num2)
					}
				}
			})
		</script>	
		
	</body>
</html>
